package com.easygo.controller;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@Scope("prototype")
public class CommonController {
    /**
     * 登录页面跳转方法
     * @return
     */
    @RequestMapping(value = {"/","/login","login.html"})
    public String toLoginPage(){
        return "login"; //跳转到模板引擎上
    }


    /**
     * 通用的页面跳转方法
     * @param page
     * @return
     *
     */
    @RequestMapping("/page_{page}")
    public String page(@PathVariable("page") String page){
        return page; //跳转到模板引擎上
    }
}
